<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

    <script>
        const p1 = new Promise(resolve => setTimeout(() => {
            resolve(1);
        }, 3000))

        const p2 = new Promise(resolve => setTimeout(() => {
            resolve(2);
        }, 2000));

        const p3 = new Promise(resolve => setTimeout(() => {
            resolve(3);
        }, 1000))

        async function fn() {
            const r3 = await p3;
            console.log(r3);
            const r2 = await p2;
            console.log(r2);
            const r1 = await p1;
            console.log(r1);
        }
        fn();

    </script>

</body>

</html>